package com.ceadeal.auth.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 功能描述: todo
 *
 * 作者: Yzw
 * 日期: 2017-03-01 15:36:48
 */
@Entity
@Table(name = "cdl_user")
public class User extends BaseEntity {

    /** 用户名 */
    @Column
    private String userName;

    /** 登录密码 */
    @Column(nullable = false)
    private String password;

    /** 昵称 */
    @Column
    private String nickName;

    /** 手机号 */
    @Column
    private String mobile;

    /** 邮箱 */
    @Column
    private String email;

    /** 头像 */
    @Column
    private String avatar;

    /** 等级 */
    @Column(nullable = false)
    private Integer level = 0;

    public User(){}

    public User(String userName, String password, String nickName, String mobile, String email, String avatar, Integer level) {
        this.userName = userName;
        this.password = password;
        this.nickName = nickName;
        this.mobile = mobile;
        this.email = email;
        this.avatar = avatar;
        this.level = level;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + this.getId() + '\'' +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", nickName='" + nickName + '\'' +
                ", mobile='" + mobile + '\'' +
                ", email='" + email + '\'' +
                ", avatar='" + avatar + '\'' +
                ", level=" + level +
                '}';
    }
}
